package com.android.yummycookies.service.storer.imagesStorer;

import android.content.Intent;
import android.os.Binder;
import android.os.IBinder;

import com.android.yummycookies.BuildConfig;
import com.android.yummycookies.service.storer.StoreService;
import com.android.yummycookies.service.storer.imagesStorer.binder.BitmapsStoreBinder;
import com.android.yummycookies.storage.BitmapStorage;
import com.android.yummycookies.storage.factory.BitmapStorageFactory;
import com.android.yummycookies.util.Logger;

/**
 * Service de stockage de bitmap
 * 
 * @author julien
 * 
 */
public class BitmapsStoreService extends StoreService<BitmapStorage> {

	public static final String TAG = BitmapsStoreService.class.getSimpleName();

	private final Binder binder;

	public BitmapsStoreService() {
		super();
		BitmapStorageFactory bsf = new BitmapStorageFactory();
		setStorer(bsf.getBitmapStorage());
		binder = new BitmapsStoreBinder(this);

		Logger.logDebug(TAG, TAG + " created");
	}

	@Override
	public IBinder onBind(Intent intent) {
		Logger.logDebug(TAG, TAG + " return binder");
		return binder;
	}
	
	@Override
	public boolean onUnbind(Intent intent) {
		Logger.logDebug(TAG, TAG + " undbind service");
		return super.onUnbind(intent);
	}

}
